// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
//导入mint ui
//导入Mint-UI所有组件   把所有组件注册为全局组件
//注意导入MintUi之后 CSS Components 不需要按需导入 直接使用即可
import MintUI from 'mint-ui';
//导入Mint-UI样式库
import 'mint-ui/lib/style.css';
//手动安装MintUI
Vue.use(MintUI);

//导入vue-resource
import VueResource from 'vue-resource';
Vue.use(VueResource);


//导入时间插件
import moment from 'moment';
//定义全局过滤器
Vue.filter('dateFormat',function(dataStr,pattern='YYYY-MM-DD HH:mm:ss'){
  return moment(dataStr).format(pattern);
});

//安装图片预览插件
import VuePreview from 'vue-preview'
Vue.use(VuePreview)

Vue.config.productionTip = false

/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  components: { App },
  template: '<App/>'
})
